/*
 *  Controller.h: Controller Object of Gomoku.app
 *
 *  Copyright (c) 2000 Nicola Pero <n.pero@mi.flashnet.it> (parts marked (NP))
 *  Copyright (c) 2004 Adam Nohejl <adam.nohejl@kppm.cz> (parts marked (Loki))
 *  
 *  Author: Nicola Pero (parts marked (NP))
 *  Date: April, September 2000
 *
 *  Author: Adam Nohejl (parts marked (Loki))
 *  Date: 2004-02-21 - 2004-04-08
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#ifndef INCLUDE_CONTROLLER_H
#define INCLUDE_CONTROLLER_H

#import "Board.h"
#import "tile.h"
#import "game_type.h"


@class Prefs;				/* (Loki) */

@interface Controller : NSObject /* formerly: : NSWindow; make window rather an ivar (Loki) */{
	MainBoard				*board;					/* (NP) */
	NSWindow				*boardWin;				/* (Loki) */
	IBOutlet Prefs			*prefs;					/* (Loki) */
	int						boardSize;				/* (Loki) */
	int						gameTile; // Li Wei Nan
	int						gameType; // Li Wei Nan
	bool					isUserFirstMove; // Li Wei Nan
	NSSize					contentSize;			/* (Loki) */
}

- (void)		setUpWindow; /* formerly: - init: (int) cnt; (Loki) */
- (void)		applicationDidFinishLaunching: (NSNotification *)aNotification; /* (NP) */
- (IBAction)	newGame:(id)sender; 	/* (NP), changed type to IBAction (Loki) */
- (IBAction)	open:(id)sender;								/* (Loki) */
- (IBAction)	save:(id)sender;								/* (Loki) */
- (void)		setDifficultyLevel:(int)level;					/* (Loki) */
- (void)		setSounds:(BOOL)s theme:(int)t zoom:(int)z;		/* (Loki) */
- (BOOL)		newGameIfUserHadNotPlayed;						/* (Loki) */
- (void) undoMoveInRow: (int) i  column: (int) j currTile:(tile)currTile; // Li Wei Nan
- (void) redoMoveInRow: (int) i  column: (int) j currTile:(tile)currTile; // Li Wei Nan

@end

#endif
